The CT_LUMINANCE function calculates the luminance of colors.
This routine is written in the IDL language. Its source code can be found in the file ct_luminance.pro in the lib subdirectory of the IDL distribution.
Result = CT_LUMINANCE( [R, G, B] [, BRIGHT=variable] [, DARK=variable] [, /READ_TABLES] )
The function returns an array containing the luminance values of the specified colors. If the R, G, and B parameters are not specified, or if R is of integer, byte or long type, the result is a longword array with the same number of elements as the input arguments. Otherwise, the result is a floating-point array with the same number of elements as the input arguments.
An array representing the red color table. If omitted, the color values from either the COLORS common block, or the current color table are used.
An array representing the green color table. This parameter is optional.
An array representing the blue color table. This parameter is optional.
Set this keyword to a named variable in which the array index of the brightest color is returned.
Set this keyword to a named variable in which the array index of the darkest color is returned.
Set this keyword, and don’t specify the R, G, and B arguments, to read colors directly from the current colortable (using TVLCT, /GET) instead of using the COLORS common block.
Pre 4.0 |
Introduced |